
<html><HEAD>
<LINK REL=STYLESHEET HREF="default.css" TYPE="text/css">
<TITLE>
Using cookies with the Web service client</TITLE>
</HEAD>
<BODY>

<!-- Header -->
<p class="ancestor" align="right"><A HREF="apptechp203.htm">Previous</A>&nbsp;&nbsp;<A HREF="apptechp205.htm" >Next</A>
<!-- End Header -->
<A NAME="BABCDAEB"></A><h1>Using cookies with the Web service client</h1>
<A NAME="TI5973"></A><p>PowerBuilder
provides support for adding and getting cookies when you use .NET
Web services. </p>
<A NAME="TI5974"></A><p>When you build a Web service proxy object, PowerBuilder adds <b>PBAddCookie</b> and <b>PBGetCookies</b> to
the list of proxy object functions. You use the <b>PBAddCookie</b> function
to add a cookie to the Web service proxy object. The cookies that
you add must first be defined with methods of the SoapPBCookie class
that is included in the <i>pbwsclient115.pbx</i> extension.</p>
<A NAME="TI5975"></A><p>After you connect to the Web service and add a cookie to the
instantiated Web service proxy object, the cookie will be sent to
the server each time you invoke a Web service method. If there is
already a cookie with the same name and URI as the cookie that you
define, you will replace the existing cookie with the new one.</p>
<A NAME="TI5976"></A><p>The <b>PBGetCookies</b> function returns an array
of cookies from a URI that you specify in a function argument.</p>
<A NAME="TI5977"></A><p>For information on SoapPBCookie methods for getting and setting
cookie properties, see the <i>PowerBuilder Extension Reference</i>
.
For descriptions of the <b>PBAddCookie</b> and <b>PBGetCookies</b> functions,
see the <i>PowerScript Reference</i>
.</p>

